<%@ page language="java" pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<link rel="stylesheet" type="text/css" href="css/base.css" />
	<base href="<%=basePath%>">

	<title>Detalle de Avion</title>
	
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

</head>
  
<body>
	<f:view>
		<h:form id="avionForm">
			<h:panelGrid id="menu_avion" border="0" columns="3" binding="#{administrarAvionesBean.dataPanel}" cellspacing="5">
				<h:outputText value="Marca"></h:outputText>
				<h:inputText id="marca" value="#{administrarAvionesBean.marca}" required="true" maxlength="20" size="20"/>
				<h:message for="marca" errorClass="error"></h:message>

				<h:outputText value="Modelo"></h:outputText>
				<h:inputText id="modelo" value="#{administrarAvionesBean.modelo}" required="true" maxlength="20" size="20"/>
				<h:message for="modelo" errorClass="error"></h:message>
				
				<h:outputText value="Velocidad"></h:outputText>
				<h:inputText id="velocidad" value="#{administrarAvionesBean.velocidad}" required="true" maxlength="10" size="20"/>
				<h:message for="velocidad" errorClass="error"></h:message>

				<h:outputText value="Categoria"></h:outputText>
				<h:selectOneMenu id="categorias" value="#{administrarAvionesBean.categoriaAvion}" required="true">
						<f:selectItems value="#{administrarAvionesBean.categorias}"/>
				</h:selectOneMenu>
				<h:message for="categorias" errorClass="error"></h:message>
				
			</h:panelGrid>
			<f:verbatim><br></f:verbatim>

			<h:panelGroup>
			<h:commandButton value="Guardar" action="#{administrarAvionesBean.guardar}"/>
			<h:commandButton value="Cancelar" action="#{administrarAvionesBean.listar}" immediate="true" />
			</h:panelGroup>

			<f:verbatim><br><br></f:verbatim>
			<h:message for="avionForm" errorClass="error"></h:message>
		</h:form>
	</f:view>
</body>
</html>